package com.wenlin.myproduction.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author 文琳
 * @Email 377979485@qq.com
 * @desc
 * @time 2023-02-12 星期日 20:31
 */
public class SelectNumber implements Parcelable {
    private int id;
    private int num;
    private boolean checked;

    public SelectNumber(int id, int num, boolean checked) {
        this.id = id;
        this.num = num;
        this.checked = checked;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public boolean isChecked() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked = checked;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeInt(this.num);
        dest.writeByte(this.checked ? (byte) 1 : (byte) 0);
    }

    protected SelectNumber(Parcel in) {
        this.id = in.readInt();
        this.num = in.readInt();
        this.checked = in.readByte() != 0;
    }

    public static final Creator<SelectNumber> CREATOR = new Creator<SelectNumber>() {
        @Override
        public SelectNumber createFromParcel(Parcel source) {
            return new SelectNumber(source);
        }

        @Override
        public SelectNumber[] newArray(int size) {
            return new SelectNumber[size];
        }
    };
}
